#include <iostream>
#include <string>
using namespace std;

int main()
{
    string line1, line2;
    getline(cin, line1);
    cin >> line2;

    for (int i = 0; i < line2.size(); i++)
    {
        while (line1.find(line2[i]) != string::npos)
            line1.erase(line1.find(line2[i]), 1);
    }

    cout << line1 << endl;
    return 0;
}